<?php
require __DIR__."/vendor/autoload.php";
//echo 'start'.PHP_EOL;
//$poolArr=[];
go(function(){
   $pool=new \App\pool\PDOPool();
   $pool->initPool();
   for ($i=0;$i<3;$i++){
       $poolArr[$i] = $pool->getDB();
      /* $conn = $pool->getDB();
       $state=$conn->query("select $i");
       $state->setFetchMode(PDO::FETCH_ASSOC);
       $rows=$state->fetchAll();
       var_dump($rows);
       sleep(5);*/
   }

   while(true){
       \Swoole\Coroutine::sleep(1);
   }

});
/*sleep(5);
foreach ($poolArr as $value)
    var_dump($value);*/



